﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace SRF.Web.Areas.Admin.Models
{
    public class ChangePasswordModel
    {
        [Required(ErrorMessage = "登录名不能为空")]
        [Display(Name = "登录名")]
        public string LoginId
        {
            get;
            set;
        }

        [Required(ErrorMessage = "旧密码不能为空")]
        [DataType(DataType.Password)]
        [Display(Name = "当前密码")]
        public string OldPassword { get; set; }

        [Required(ErrorMessage = "密码不能为空")]
        [DataType(DataType.Password)]
        [Display(Name = "新密码")]
        [StringLength(10, MinimumLength = 3, ErrorMessage = "密码长度应该在3到10之间")]
        public string NewPassword { get; set; }
         
        [StringLength(10, MinimumLength = 3, ErrorMessage = "密码长度应该在3到10之间")]
        [Compare("NewPassword", ErrorMessage = "输入的新密码不一致")]
        public string ConfirmPassword { get; set; }


    }
}